<!DOCTYPE html>
<svg style="display:none;">
    <rect id="rectReference" width="200" height="200" fill="red" />
</svg>
<template id="template">
    <svg width="100" height="100" style="display:none;">
        <rect id="rectReference" width="100" height="100" fill="green" />
    </svg>
    <svg width="100" height="100">
        <rect width="100" height="100" fill="red" />
        <use xlink:href="#rectReference" />
    </svg>
</template>
<script>
    document.body.attachShadow({mode: 'open'}).appendChild(template.content.cloneNode(true));
</script>